{% extends 'layouts/blank.html' %}
{% set title = '登陆' %}

{% block style %}
<link href="/public/css/main.css " rel="stylesheet">
{% endblock style %}

{% block body %}
<div class="d-flex align-items-center justify-content-center pb-5 vh-100 bg-panel">
    <div class="w-25 pb-5 min-backdrop">
        <form action="/login" method="post">
            <div class="h3 mb-5 fw-normal">欢迎使用 Simple CRM</div>
            {% if hasError %}
            <div class="alert alert-danger alert-dismissible fade show" role="alert">
                {{ message }}
                <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
            </div>
            {% endif %}
            <div class="mb-3">
                <label for="nameInput" class="form-label">用户名</label>
                <input type="text" name="name" class="form-control" id="nameInput" placeholder="用户名" autocomplete="name"
                    required autofocus minlength="3" value="{{name}}">
            </div>
            <div class="mb-3">
                <label for="passwordInput" class="form-label">密码</label>
                <input type="password" name="password" class="form-control" id="passwordInput" placeholder="密码"
                    autocomplete="current-password" required minlength="6">
            </div>
            <button class="w-100 btn btn-lg btn-dark" type="submit">登陆</button>
        </form>
        <div class="mt-3 fw-light"><strong>Rui @2022</strong></div>
    </div>
</div>
{% endblock body %}